<?php

## Extend CI_Controller to include Doctrine Entity Manager

class MY_Controller extends CI_Controller {

    public $em;

    function __construct() {
        parent::__construct();

        $this->em = $this->doctrine->em;
    }
    
    public function getEM(){
        return $this->em;
    }
    
    public function setEM($em){
        $this->em = $em;
    }

}

?>